package com.open.cloud.rbac;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import com.inspur.micro.core.utils.RSAUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
public class SerOpenRBACApplication {

    public static void main(String[] args) {

        SpringApplication.run(SerOpenRBACApplication.class, args);

        RSAUtil.initKey();
    }

    @Bean
    public Snowflake snowflake() {
        return IdUtil.getSnowflake(1, 1);
    }

}
